aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/[username]/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/[username]/index.js')
-rw-r--r--src/routes/[username]/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/routes/[username]/index.js b/src/routes/[username]/index.js
new file mode 100644
index 00000000..5de1316f
--- /dev/null
+++ b/src/routes/[username]/index.js
@@ -0,0 +1,14 @@
+import { get } from '$lib/utils';
+
+export async function GET({ params }) {
+ let { username } = params;
+ let body;
+
+ try {
+ body = await get(`/users/${username}`);
+ } catch (e) {
+ body = {};
+ }
+
+ return { body };
+}